<!-- 03VueInstance.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
	<link rel="stylesheet" href="./css/common.css"/>
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
	<!-- <script src="https://cdn.bootcss.com/axios/0.19.0/axios.min.js"></script> -->
	<!-- <script src="https://cdn.bootcss.com/lodash.js/4.17.15/lodash.min.js"></script> -->
</head>
<body>
	<h2>props & v-bind</h2>
	<div id="demo">
		<blog-post 
			v-for="post in posts"
			v-bind:key="post.id"
			v-bind:title="post.title">
		</blog-post>
	</div>
    <script>
		Vue.component('blog-post', {
			props: ['title'],
			template: '<h4>{{title}}</h4>'
		})
        var demo = new Vue({
			el: '#demo',
			data: {
				posts: [
					{id:1, title: 'My journey with Vue'},
					{id:2, title: 'Blogging with Vue'},
					{id:3, title: 'Why Vue is so fun'}
				]
			}
        });
    </script>
</body>
</html>